/*
 * @Author: C.
 * @Date: 2023-01-29 14:35:53
 */
// 将预设字段 转换成对象结构
export function fieldsToMaps<T>(fields: T[], key: string) {
  const result = {};
  fields.forEach((item) => {
    result[item[key] as string] = item;
  });
  return result;
}

export const fields = [
  { label: '客户编号', field: 'CustomerId' },
  { label: '税率', field: 'Tax' },
  { label: '货币', field: 'Currency' },
  { label: '单据编号', field: 'BillId' },
  { label: '单据GUI', field: 'BillGui' },
  { label: '客户简称', field: 'CustomerName' },
  { label: '计划交期', field: 'DeliveryDate' },
  { label: '状态', field: 'State' },
  { label: '制单人', field: 'Creator' },
  { label: '制单日期', field: 'CreationDate' },
  { label: '备注', field: 'Remarks' },
  { label: '编号', field: 'Id' },
  { label: '物料编号', field: 'ItemId' },
  { label: '物料名称', field: 'ItemName' },
  { label: '描述', field: 'Description' },
  { label: '单位', field: 'Unit' },
  { label: '数量', field: 'Quantity' },
  { label: '单价', field: 'Price' },
  { label: '金额', field: 'Amount' },
  { label: '仓库', field: 'Stockroom' },
  { label: '关联编号', field: 'AssociatedNo' },
  { label: '批号', field: 'LotNumber' },
  { label: '客户编号', field: 'SupplierId' },
  { label: '提交人', field: 'Submitter' },
  { label: '部门', field: 'Department' },
  { label: '供应商简称', field: 'SupplierName' },
  { label: '扣税金额', field: 'TDA' },
];
